package com.sdut.material.controller;


import com.sdut.material.pojo.vo.LayUISelectMVO;
import com.sdut.material.service.IPermissionService;
import com.sdut.material.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Yu
 * @since 2022-04-20
 */
@Controller
@RequestMapping("/permission")
public class PermissionController {
    @Autowired
    private IPermissionService permissionService;
    @RequestMapping("/selectAllPermissions")
    @ResponseBody
    public JSONResult selectAllPermissions() {
        List<LayUISelectMVO> list = permissionService.selectAllPermissions();
        return JSONResult.ok(list);
    }
}

